#include<iostream>
#include<unistd.h>

int main()
{
    int cnt =0;
    alarm(1);                       //设定一个1秒后的闹钟，1s后会收到信号SIGALRM
    while(true)
    {
        std::cout<<"hello bit, "<<" pid: "<<getpid()<<", cnt = "<<cnt<<std::endl;
        cnt++;
    }
    return 0;
}